package
{
	import com.greensock.TweenLite;
	
	import flash.display.Sprite;
	import flash.events.MouseEvent;
	
	public class Tree extends Sprite
	{
		public function Tree()
		{
			graphics.beginFill(Math.random()*0xffffff);
			graphics.lineStyle(1,0,0.5);
			graphics.lineTo(-10,0);
			graphics.lineTo(-10,-30);
			graphics.lineTo(-40,-30);
			graphics.lineTo(0,-100);
			graphics.lineTo(40,-30);
			graphics.lineTo(10,-30);
			graphics.lineTo(10,0);
			graphics.lineTo(0,0);
			graphics.endFill();
			addEventListener(MouseEvent.ROLL_OVER,onOver);
			addEventListener(MouseEvent.ROLL_OUT,onOut);
		}
		
		protected function onOut(event:MouseEvent):void
		{
			TweenLite.to(this,0.2,{scaleX:1,scaleY:1});
		}
		
		protected function onOver(event:MouseEvent):void
		{
			TweenLite.to(this,0.2,{scaleX:2,scaleY:2});
		}
	}
}